Locking nodes or entities to prevent concurrent editing
I believe this is already implemented to some degree. If two users are editing the same piece of content, and one submits changes, the other user will receive this message when trying to do the same:


  The content on this page has either been modified by another user, or you have already submitted modifications using this form. As a result, your changes cannot be saved.


It happens in the node_validate() function in case you're interested in checking out the code.