UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'xWnSS4Bs5QbhL5xDYJwYpYtZ1CW7crj/oXey1fqpZLI='
WHERE
key_id = '2b6d6d165d3cf2d3c33b1b7646639ac2a04f5de37007a9bc6b42149cf76284b7'
AND (
token = 'xWnSS4Bs5QbhL5xDYJwYpYtZ1CW7crj/oXey1fqpZLI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)