UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'c1WoJ4dLLUo7voBX1mBh+wi7QnpkHJKHIxsDzY3+Fqw='
WHERE
key_id = '35908ae0408ca952be9dae2e8a8200c49e3bc15779d3653a21a3ad066d350b30'
AND (
token = 'c1WoJ4dLLUo7voBX1mBh+wi7QnpkHJKHIxsDzY3+Fqw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)