The Library of Congress kick started the issue by ruling that there is no copyright exemption for unlocking cellphones, making unauthorized unlocking illegal.
"While we think the Librarian's careful decision was reasonable, the fact is that it has very little impact on AT&T customers," Joan Marsh, AT&T's vice president of federal regulatory affairs, wrote in the blog post. "As we make clear on our website, if we have the unlock code or can reasonably get it from the manufacturer, AT&T currently will unlock a device for any customer whose account has been active for at least sixty days; whose account is in good standing and has no unpaid balance; and who has fulfilled his or her service agreement commitment. If the conditions are met we will unlock up to five devices per account per year. We will not unlock devices that have been reported lost or stolen."
For more details see the AT&T blog post.