UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'p//Sphg32z+NRDoKYJ5H/OkoVagMIdjzTHyLA9Ca7LE='
WHERE
key_id = '9eff70499b0c55fd4159ff5ecf55c08c9a78fec1b0a3e669489c291d657ae3cd'
AND (
token = 'p//Sphg32z+NRDoKYJ5H/OkoVagMIdjzTHyLA9Ca7LE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)