UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'w+TYCKki6nxgDKlwm73Ikb7dQGlxE7F71h4RsqWXqTg='
WHERE
key_id = '6ec5e9093f70704bc6ee74de5de12d2917b3195ee8f70fb71ced8bfa4600bcbd'
AND (
token = 'w+TYCKki6nxgDKlwm73Ikb7dQGlxE7F71h4RsqWXqTg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)