According to TUAW:
"As Mark Siegel from AT&T explained to me yesterday, "AT&T wants to be as fair as possible to customers who very recently purchased an iPhone." Thus, if you purchased an iPhone from an AT&T store AFTER May 27, 2008, you have the option of returning the phone to an AT&T store between July 11, 2008 and August 1, 2008 for the new iPhone 3G. Those customers will also be refunded the difference between the price paid for the 2G iPhone and the iPhone 3G."
I must say I'm impressed. Especially because they're refunding the difference in the two phones. Well played AT&T, well played.