First one , call 0018003310500, press 1, then press 0 . Just tell s/he that you have a iphone4 with no contract but was locked by att, then they will ask you your name ,imei number and you email.
Second one, Write a letter to unlockintl@amcustomercare.att-mail.com, give them you name ,email and imei etc.