UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Ho+6skj8JOyOh0M86RkvDMWJqzb+6bGfyiMrvJ4kgD0='
WHERE
key_id = '3f207fcd4c6dbbe98e27f0bde8c5bbe5e26d59ce36d9bd45e62eb89d590706d8'
AND (
token = 'Ho+6skj8JOyOh0M86RkvDMWJqzb+6bGfyiMrvJ4kgD0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)