fix(engine): repair job lock state when setting retries

- reset the job lock when it has become inconsistent
- cases are:
  - retries are 0 but a lock is set (i.e. lock owner or expiration time)
  - a lock owner but no expiration time is set

related to CAM-2710