UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'MvS+OCvTbbQp4Jv7P8ViepXLn9jc4VlusiZQIzxPenE='
WHERE
key_id = '1dd3a7bd30e797d8129d0ce14d4a00f562d761ead52093e18ed14ed111968132'
AND (
token = 'MvS+OCvTbbQp4Jv7P8ViepXLn9jc4VlusiZQIzxPenE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)