Complex sentence: The ignition system must prove that a flame is present to continue the gas flow, or if there's no flame, then shut off the gas flow through the gas valve to prevent a possible explosion.
Split into simpler sentences: The ignition system must prove that a flame is present in order to continue the gas flow. Or, if there is no flame, then the system must shut off the gas flow through the gas valve, in order to prevent a possible explosion.