UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'GkzgBMnaP705wNggoh83BLo5S3AKg/SCkfWyW1LYNTo='
WHERE
key_id = '94ae4e3f279a57d343c96252a56bcc28f7831ff7ac823302b6bcec16bf2d9a94'
AND (
token = 'GkzgBMnaP705wNggoh83BLo5S3AKg/SCkfWyW1LYNTo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)