UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'LGb0ZG36PQJ9lH1z4rFN7I/OGUXtUN7vQ3kTr9KHj6o='
WHERE
key_id = 'acd6f1da28482c358b79908550d51377a3303c93c99cd7e4f5f932d765bc9e03'
AND (
token = 'LGb0ZG36PQJ9lH1z4rFN7I/OGUXtUN7vQ3kTr9KHj6o='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)