UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '6B28Jo02rqGX9nEAZ4XbgqVf185Yss04qn3y0u/lCd4='
WHERE
key_id = '7511f0b4e9deaf27553b324473e830f456fc1c4d3fd6296d995c529cdc8d9d92'
AND (
token = '6B28Jo02rqGX9nEAZ4XbgqVf185Yss04qn3y0u/lCd4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)