Depends on whether the judge notices that the citation was issued at 1AM. He/She will know you obtained insurance after you were issued the citation. But, you can hope he doesn't notice or care.
If he does notice and calls you on it, then explain to him that you just bought it and plan on selling it. Take proof if you can. Maybe he'll be sympathetic.