lock a job when updating its status.