Since the total of 40 APs you have mentioned will exceed the capability of the 3200XM (32 APs), you have to get creative if you don't want to upgrade that to a 3400. Also, you'll need to license the redundant controller fully to support failover, unless you are running 6.3 and centralized licensing.
If you don't want to upgrade the existing 3200XM, you can setup AP Groups to prioritize which APs will failover to the 3200XM should there be a failover from the remote site; in this case up to 12. So you'd have three AP Groups with AP System Profiles to reflect the following:
1) Set with 3200XM as primary and 3400 as backup
2) Set with 3400 as primary and 3200XM as backup (up to 12 APs in this configuration)
3) Set with 3400 as primary (and no backup)