UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'aCTeUaBwN+OZbj9sQgQnr2WloLPrCNvLQgziR0qREqA='
WHERE
key_id = '6fee87c4d4400c5f54fd4e107cb8926b19c46d83120ae798b83f33b5f90113c5'
AND (
token = 'aCTeUaBwN+OZbj9sQgQnr2WloLPrCNvLQgziR0qREqA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)