Prayer while walking is valid under the same rule as mounted voluntary prayer.

Voluntary Prayer Sitting or Riding — and Prayer on a Mount