If a person doubts whether or not he has performed a ṣalāt al‑iḥtiyāṭ that was obligatory for him, in the event that the time for prayer has expired, he must dismiss his doubt. However, if there is time, then in case a lot of time has not elapsed between the doubt and the [original] prayer, and he has not started to do something else, and he has not done something that invalidates prayers – such as turning his back to qibla – in such a case, he must perform ṣalāt al‑iḥtiyāṭ.
However, if he has done something that invalidates prayers, or he has started to do something else, or a lot of time has elapsed between the doubt and the [original] prayer, then based on obligatory precaution, he must perform the [original] prayer again.