Pessimistic locking for Ruby and MongoDB