UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'F1P1crulq3EpEPl/yIg8h5R506mdiEZwplPmw2Jkdo4='
WHERE
key_id = '80629b099a9a7aed37391c37997ed4f7bc819f336100e1c02c0bf4b809eb72e5'
AND (
token = 'F1P1crulq3EpEPl/yIg8h5R506mdiEZwplPmw2Jkdo4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)