UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '1C9DKtdM6Rooe6goPmpM9XrR5PseMipjF9XLu5KGPVY='
WHERE
key_id = '96fe5d7717547f9565b1800ebb62e97fde1ecaa702b7fad39197e1e1bb803470'
AND (
token = '1C9DKtdM6Rooe6goPmpM9XrR5PseMipjF9XLu5KGPVY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)