Impact of X-rays on CO emission from high-z galaxies