UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'nzldlMVSsrAsDutxCqF/N24jLI0WrQ+LxqafgXcjESU='
WHERE
key_id = '484ab31a814c1cf2e7f6d4cbe86446e262aa27c8006b58c07f4fffa6636b4d3d'
AND (
token = 'nzldlMVSsrAsDutxCqF/N24jLI0WrQ+LxqafgXcjESU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)