UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'PwK3dhgcSMdIXbHBwrJNLQxt+fZVeUAV8p7xlw6EL1Q='
WHERE
key_id = '3e2d05ebec37079b9d163a0bce9380175f6d65a4cfc912a205f6227b7b24c33a'
AND (
token = 'PwK3dhgcSMdIXbHBwrJNLQxt+fZVeUAV8p7xlw6EL1Q='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)