There is a bug with a migration in 16.2, will be fixed in 16.3: Error upgrading from Umbraco 13 to 16: LockObject with id=-344 does not exist. · Issue #20037 · umbraco/Umbraco-CMS
In short you can run this SQL command on the db to get around it and have it finish successfully:
INSERT INTO umbracoLock (id, [value], [name])
VALUES (-345, 1, 'DocumentUrls')