When a deferred task is forcibly completed (which happens when you deploy a new production version using capistrano), the currently processed jobs that are locked will remain locked. You can manually clear the lock by setting the locked_at and locked_by to null.
source share