You can use a control entity to lock the object when someone opens it. The controller needs to be committed when there are changes in your object. So, it will only be possible to open your object when the lock in the controller is set to false.
Have a look at this –
Its Mx V7 but will work on later versions too, as long as you don’t need support for native/offline working.