Whatever you can mount with a random token is always simpler than checking if Token_ID_A &lt; Token_ID_B which needs a linearizable store. But basically this is how it works:<p>You want to modify locked resource X. You set X.currlock = token. Then you read, do whatever you want, and when you write, you &quot;write-if-currlock == token&quot;. If another client did X.currlock = somethingelse, the transaction fails.<p>Edit: note that I noticed some confusion about this. Any other client is free to replace X.currlock even if set to a past value.