UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'It2NLWGSwZ0gUhmDBf+cKwf6nJa9lkeIFxC2hgLEaKk='
WHERE
key_id = '5e41f57192c99fcc2c5eb12c5c0bb0afeb0274d9fd606d4e88159b7bb9904f94'
AND (
token = 'It2NLWGSwZ0gUhmDBf+cKwf6nJa9lkeIFxC2hgLEaKk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)