Optical frequency comb generation by continuous-wave-pumped cascaded quadratic nonlinearities (CQN) appears a promising alternative to well-established modelocked lasers, especially if access to the mid-infrared spectral region is needed. We report an experimental investigation of spectral properties of a CQN frequency comb, which is based on second-harmonic generation (SHG) and is pumped internally by a continuous-wave optical parametric oscillator. Our study focuses on SHG phase mismatch, which has drawn little attention in the previously reported CQN frequency comb research. The main observation of our study is that it is possible to improve spectral purity of the CQN frequency comb by adjusting the phase mismatch. In addition to the CQN process that generates a frequency comb in the near-infrared region, our experimental setup involves several other nonlinear processes. These processes lead to a composite comb, which extends from visible to mid-infrared.