UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'HYBQ8OvbseOnkR7u9agLhb1ymhOhSjbKtkOEoWS/eyU='
WHERE
key_id = '3dd7a8b33228dd9e6d4b9b5d9c6e9b852daa90d3a96d08647f52692947918be6'
AND (
token = 'HYBQ8OvbseOnkR7u9agLhb1ymhOhSjbKtkOEoWS/eyU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)