UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '1K3++jnhccAH9Pphegsdd+aUr4YguXs0OfnNAea2was='
WHERE
key_id = 'c76343bea62d036e058c13a508425b0818d41e08c10e5e629021f2d5f66de54d'
AND (
token = '1K3++jnhccAH9Pphegsdd+aUr4YguXs0OfnNAea2was='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)