UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FI2LIRjEGuT4KPmF09xcL/4zI0/TV1/vOxWUiDf1H7o='
WHERE
key_id = '831932cea856f514c7b64459d5c4e1741eacf720dcb8f8198a7e25d868e36253'
AND (
token = 'FI2LIRjEGuT4KPmF09xcL/4zI0/TV1/vOxWUiDf1H7o='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)