UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'OT5/DHAnfeXWnliyXlojsQ0Ae/lnIoOGiqZS1bbrZjc='
WHERE
key_id = 'bca9a646d2344b27ee9faabe0488da6cdec417ddec481841388016466104ca9d'
AND (
token = 'OT5/DHAnfeXWnliyXlojsQ0Ae/lnIoOGiqZS1bbrZjc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)