UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'DE/oycqn7aW8aV83AhVKRhcvJwUcdIdpSg2o50nI3/Q='
WHERE
key_id = '95da899b14d227a0e78ffcef7816a9a73d844a99b2c1d3edb8ed5b43d056605d'
AND (
token = 'DE/oycqn7aW8aV83AhVKRhcvJwUcdIdpSg2o50nI3/Q='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)