Its apparent meaning is that there is no prohibition on prayer in the Sacred Mosque, even during the prohibited times.
Accordingly, the use of this hadith as evidence may be disputed from two perspectives:
First: its apparent meaning is that there is no objection to either prayer or tawaf at any time, whereas you restrict prayer to the two rak'ahs of tawaf.
Second: the hadith is addressed to those in authority over the Sacred Mosque: they are not permitted to prevent anyone from praying therein.
In any case, Allah willing, it will become clear that the two rak'ahs of tawaf are permissible—not on account of this hadith, but because they have a specific cause; and prayers performed for a specific cause may be offered during the prohibited times. (1)
His statement, “during the three times,” implies that the two rak'ahs of tawaf may not be performed during the other two times. However, this is not what is intended. The implication here is one of greater priority, not a contrary implication. For if the two rak'ahs of tawaf may be prayed during the three short periods—which are more severely prohibited than the two long periods—then they are all the more permissible during the long periods. The author specifically mentioned the three periods because some scholars held that the two rak'ahs of tawaf may not be performed during the three short periods, but are permissible only during the two long periods. This is one of the two narrations from Imam Ahmad.