Add utils for locking couch docs