If you want to raise the CPU clock, make the FLASHTIM value bigger first, then switch the clock to higher speed. If you want to lower the CPU clock, switch the clock to slower clock first, then make the FLASHTIM value smaller.
As long as you follow this order, everything should be fine.