UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'yuYy+F3LIjwYKa0GtQb1rbZxucdIiSeJHIJGDmZ0KJk='
WHERE
key_id = 'f4764e3974d2fb84969d474441dffaad143e416c769f6a7575c4ddc6ff35a9c7'
AND (
token = 'yuYy+F3LIjwYKa0GtQb1rbZxucdIiSeJHIJGDmZ0KJk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)