As long as they leave it on the books and don't enforce it, no. But if someone is enforced for a stupid law, that may well be unconstitutional.
Leaving aside sodomy, which is a hot potato, consider some of the really stupid laws we've all heard about, e.g., Indiana prohibits bathing in the wintertime, and Iowa prohibits kisses that last for more than five minutes.
http://homepages.nildram.co.uk/~jimella/laws01.htm It's all very well and good to say "oh, that's a stupid law but nobody gets prosecuted, really." What happens if somebody decides to enforce it?
Does the state of Indiana really have a rational basis for prohibiting bathing in the winter?