UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'iuAFXRK6Qf/w/ctoaulC95DbO0E9mgNwWYbTqRNr4uU='
WHERE
key_id = '77324259b017e5367d34443b098162815f5213df61710f24075133272b96ce5a'
AND (
token = 'iuAFXRK6Qf/w/ctoaulC95DbO0E9mgNwWYbTqRNr4uU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)