Refactor sql statement
Refactor sql statement

Before

`(run_at <= ? AND (locked_at IS NULL OR locked_at < ?) OR locked_by =
?) AND failed_at IS NULL`

This sql statement is really confusing for sql newbie.

After

`((run_at <= ? AND (locked_at IS NULL OR locked_at < ?)) OR locked_by =
?) AND failed_at IS NULL`

`And` has precedence over `Or`. they are equal.

So this change will not break currently behavior. Just make it more plain for sql newbie.

Reviewed by David Genord and Guihere Cavalcanti

collectiveidea/delayed_job_active_record