UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'RAzz/KU3asgUMS2K+JoHdOyP9yGRO3YN4EiEfnbsRhI='
WHERE
key_id = '128b029a66887f560a458ee0c422fb37286a8feb3ae2bd82afd0538d9db964e2'
AND (
token = 'RAzz/KU3asgUMS2K+JoHdOyP9yGRO3YN4EiEfnbsRhI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)