Solid potassium iodide decomposes into solid potassium and iodine gas .

Well,l it doesn't but we'll pretend it does so we can balance the equation.

2KI ==> 2K + I2.
KI does decompose but very slowly in air. It is oxidized by O2 and reacts with CO2. The reaction is
2KI + CO2 + 1/2 O2 ==> K2CO3 + I2 or
4KI + 2CO2 + O2 ==>2K2CO3 + 2I2 which is a VERY SLOW reaction.