"My question is how long will my AP's be in a unstable state as not all 400 will get upgraded at one time .."
If the controller has default AP maintenance settings they will upgrade at once.... if you don't use fast failover.
It also depends on the upgrade path, if you upgrade from a very old image you are not able to disable upgrade of the AP image.
So how long does it take..... the main thing that affect the AP upgrade time is the link between the AP & controller, if you 've a fast LAN it should be in <15minutes in my experience(for 400 APs),
if the APs are connected via WAN it depends on the WAN speed/bandwidth available.