UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'GWL8Uf0P90Ri263EHPwcKz6v/VF5U261TBP+xCOvMl8='
WHERE
key_id = '1c5bac9e83100ec673dc3fc9afa3ab0030d2c458e75397555a7c9a7a1bbe304c'
AND (
token = 'GWL8Uf0P90Ri263EHPwcKz6v/VF5U261TBP+xCOvMl8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)