UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'NamdkoGBupelgkGQnGYQgIV6XAsYhmJhrifPNn6y6kU='
WHERE
key_id = '26ab3ab50cced2fe23bf4608b3e47180d770f9cdc085d4e57c2125a294b6911d'
AND (
token = 'NamdkoGBupelgkGQnGYQgIV6XAsYhmJhrifPNn6y6kU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)