UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/ca2EEFdGlJZ9drVHmZ3XwcRZ6G9uycpnGcYKgH/mEQ='
WHERE
key_id = '2a2551ef99e619a9b2d74d98cb6f86e50aa155cd34b41b2b31de87458a9970e1'
AND (
token = '/ca2EEFdGlJZ9drVHmZ3XwcRZ6G9uycpnGcYKgH/mEQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)