Just register the entity you want to manage locks for, and then use the RecordLock and RecordUnlock service actions.
Returns information on current lock status, namely the name of the user that currently holds the lock and the date the lock was aquired
Includes a timer to clean non-current held locks to keep database usage low.
Updated References in Demo Application