UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'mBMBQ3UcsmBH9InaBtPulEWq/LOpEa7kEv2RCCgxa9Q='
WHERE
key_id = 'efdead74aa732aea4243983424e4d4f1d436c72c59fbe1cf846beffebc94fd92'
AND (
token = 'mBMBQ3UcsmBH9InaBtPulEWq/LOpEa7kEv2RCCgxa9Q='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)