UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'y1NmvB7UrcSOBiOnJHGV0/g0qM3Ojs/NB9J9xD1r9z0='
WHERE
key_id = '468a01b5ab1623924f260b080ce192e1cfb3ff8ca6ac8806b2c26866a4e46d5d'
AND (
token = 'y1NmvB7UrcSOBiOnJHGV0/g0qM3Ojs/NB9J9xD1r9z0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)