UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FshtpkCFV+AcjFRJ+DVu/+Ta/3qsb1/OAiCRQS87bbA='
WHERE
key_id = '29ece903392e23767a77ab4167d6234582aaed774664188fea0b7f548fecf3e1'
AND (
token = 'FshtpkCFV+AcjFRJ+DVu/+Ta/3qsb1/OAiCRQS87bbA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)