UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'njQeIixDemUxysOrwWocg1j0xMztPsWN94WZDqHzCuw='
WHERE
key_id = '4d29d2c3fca11045535e746122a14febcdc36ff23207649100eed028290829df'
AND (
token = 'njQeIixDemUxysOrwWocg1j0xMztPsWN94WZDqHzCuw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)