Add pessismistic locking