This is how it is usually done with SQL Server. The "write locks" developed by the developer are not related to the client-server architecture. You confuse the shared file architecture with the client-server architecture.
Make sure the table has a timestamp column (which is automatically updated by the database engine).
Read on the line you want to edit. Put a timestamp from a string into a variable.
The update operation looks like this:
update myTable
set col = {some value}
where id = {your id}
AND
timestampcolumn = {the timestamp the row had when you read it in}
If someone changed the line after you read it, it will have a different timestamp, and no record will meet the conditions of the WHERE clause, and therefore your update will fail. Then you can decide what to do.
, SQL-Server ( Oracle -), .