UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '8V2bAMon77HMGwqLI2pyXiXtFO3piQcfbohBCLRh3D8='
WHERE
key_id = '2307ff347e067134c1248ab367b55603366ee658e015917d54cf173219934211'
AND (
token = '8V2bAMon77HMGwqLI2pyXiXtFO3piQcfbohBCLRh3D8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)