UPDATE task SET worker_id=%(worker_id)s, worker_name=%(worker_name)s WHERE task.worker_id = %(worker_id_1)s AND task.task_status != %(task_status_1)s