The court order basically told lavabit to modify the code to provide the access they were seeking. Even if the code was open sourced, you can bet that the requested modifications wouldn't have been.
If someone else held the copyright to the code and it was licensed under the AGPL, then it would be illegal to not open source such contributions. Of course, the government could work around this by providing their own mail server software or by just disregarding it.