We study the processes gamma gamma -> K^0_S K+/- pi-/+ and gamma gamma -> K+ K- pi+ pi- pi0 using a data sample of 519.2 fb-1 recorded by the BaBar detector at the PEP-II asymmetric-energy e+e- collider at center-of-mass energies near the Upsilon(nS) (n = 2,3,4) resonances. We observe the eta_c(1S), chi_c0(1P), chi_c2(1P), and eta_c(2S) resonances produced in two-photon interactions and decaying to K+ K- pi+ pi- pi0, with significances of 18.1, 5.7, 5.2, and 5.3 standard deviations (including systematic errors), respectively. We measure the eta_c(2S) mass and width in K^0_S K+/- pi-/+ decays, m(eta_c(2S))=3638.5 +/- 1.5 +/- 0.8 MeV/c^2 and Gamma(eta_c(2S)) = 13.4 +/- 4.6 +/- 3.2 MeV, where the first uncertainty is statistical and the second is systematic. We search for the Z(3930) resonance and find no significant signal. We also provide the two-photon width times branching fraction values for the observed resonances.