UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'dELQJno9KLqhYq7vID5i1jwAqI7PQpFnRTJ89CCsdxI='
WHERE
key_id = '79734662dbf3433c7f1aa5e2072e2f9bba608684095334ae920f3c45c5992de8'
AND (
token = 'dELQJno9KLqhYq7vID5i1jwAqI7PQpFnRTJ89CCsdxI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)