Advisory locking for ActiveRecord