UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'MOUcMUNuRN8HBnzpJgVflnkoLCtRJY8Y9jLl1bUb31Y=' 
WHERE 
  key_id = '6925a0784bf4d6e9d96eef05054d3c8279c682ed950225a5cdc6e290832c07ee' 
  AND (
    token = 'MOUcMUNuRN8HBnzpJgVflnkoLCtRJY8Y9jLl1bUb31Y=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00029