Use DBLock with some operations that should be atomic