Under unusual circumstances, you may pray while walking or riding. Once you are safe, you shall commemorate God as He taught you what you never knew.
فَإِن خِفتُم فَرِجالًا أَو رُكبانًا فَإِذا أَمِنتُم فَاذكُرُوا اللَّهَ كَما عَلَّمَكُم ما لَم تَكونوا تَعلَمونَ
fa in khiftum farijaalan aw rukbaanan fa izaaa amintum fazkurul laaha kamaa ‘allamakum maa lam takoonoo ta’lamoon