[tor-commits] [bridgedb/develop] Rewrite database lock acquisition function