You are the beginning of your own problem... .40 S&W is
NOT technically pistol ammunition. It is small arms ammunition.
In addition, you might want to look further down a little bit in 18 USC 922 (x) and see who it applies to:
http://www.law.cornell.edu/uscode/text/18/922
As long as the seller of the ammunition does not possess an FFL...and an FFL is not required to be a dealer in ammunition only...the legal age for the buyer in Federal law for pistol ammunition is 18. NOT 21! Most online dealers who sell ammunition but not firearms do not have FFLs because they do not require one, therefore their age limit for "handgun ammunition" is 18.
http://www.atf.gov/firearms/faq/licensees-conduct-of-business.html#small-arms-ammo-licensing
The 21 age limit applies only when the purchases is buying ammunition INTENDED FOR USE IN A HANDGUN from an FFL and has nothing to do with caliber. That is 18 USC 922 (b)(1).
There is an ATF newsletter to FFLs available for the ATF website that states that for ammunition that can be used in a rifle or handgun - the intended use of the ammunition determines whether the age limit is 18 or 21 - not the specific caliber of the ammunition. State law, of course, may be more restrictive.
http://www.atf.gov/firearms/faq/licensees-conduct-of-business.html#interchangeable-ammo-sales
There is nothing in Federal law that designates .40 S&W ammunition as "pistol only". Hopefully this will help clear up some of the misinformation out there.