Hello!
First , if I get myself in your situation I wouldn't use those tricks to get a kind of key that is not normally supported by the platform. Usually things get problematic in the most unexpected ways.
But if you insist you can add two fields to the entity , an UserId and a datetime that have to be tested each time an update is performed.
Build a SQL to bulk update those fields in all the records you want to "Select for Update " with the UserId from the current user and current dateTime.
When updating verify if the userId is equal to the the user "userId , if so update the record and clean those fields, if not don't update.
For this to work you have to think in a way to solve tow situations , what to do if the record is "occupied", what to do with a record that is not released normally. But I think this can work .
Again, think twice before use that entity.
Regards
Graça