Refine deploy workflow

something similar to:
`Lock.where(task_id: an_id, name: :deploy, resource_type: 'Deployment')`