add write lock to the shared sync-db handle