UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'HU5oYzOsh0VQT4CK3YBZx86Iz9JtA31oTd3zI5YipiE='
WHERE
key_id = '5eec2b67449172522efe030268998d099be1100697b5a6359f6a20fb3fd1c433'
AND (
token = 'HU5oYzOsh0VQT4CK3YBZx86Iz9JtA31oTd3zI5YipiE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)