UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'VIkqZbFmyZdX/ZCTWg1xVJmpb8C9fdENpQK3vIefiOk='
WHERE
key_id = 'd48a99040d62c797cd14d5301aab5739b960eeb5241854dfbe97e3e9f5e107e8'
AND (
token = 'VIkqZbFmyZdX/ZCTWg1xVJmpb8C9fdENpQK3vIefiOk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)