sure, there are several approaches. I typically create a lock resource table, an edit adds a row to the resource table, an update deletes the row. you just need to decide on the unique resource id and key for the record..
I lock per resource id allowed at a time. make the source id and key a unique key.
create table ResourceLock
(
ResourceType int not null, // row type
ResourceKey varhchar(50) not null, //row key
LockTime datetime not null default CURRENT_TIMESTAMP, //when locked
LockUser varchar(132) not null // who locked - can use a transaction guid if no user
)
typically a checkout (read for edit) create the row or gives lock error, an update checks that the row exists for the user and reports broken lock. I usually allow max lock time or users allowed to break locks.
a variant is create read locks on read, and only allow update if user has read lock, first update deletes all locks, be sure to use high enough isolation level for this.