UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'PUlqu5ZQhF6xFHKZ5LAK28vABSOFntS/wNn+u3YxptI='
WHERE
key_id = '678fe98756c655e6e1f4e0631ec2a8550e9eaa47d6cc7e4bcceb1e3434128d62'
AND (
token = 'PUlqu5ZQhF6xFHKZ5LAK28vABSOFntS/wNn+u3YxptI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)