You are better off implementing the locking code for both standalone and networked access. This simplifies the code and makes
testing your record locking a lot easier since you can test it with a program that uses it locally.
The cost of doing the synchronization and lockin when there is only one
thread is probably about the same as the cost of determining if the database is being accessed locally or remotely.