Let's assume the real problems are not with your query (say, unclear wording) but solely with the answer you accepted prematurely, before you discovered the flaws.
Before un-accepting that answer, I believe that sheer politeness and good manners require leaving a comment first, detailing the flaws you've discovered and asking the answer-giver if it's possible to revise his/her answer. Be prepared to receive, and reply to, follow-up questions from the answer-giver as he/she grapples with the new information and tries to figure out how to best fix the flaws.
If you don't receive a reply and/or an improved answer within 48 hours or so, I suppose it would be ok to unaccept. Remember that people travel at times and might not have access to their computers at all times. It would be grossly unfair to set a tight deadline that they simply cannot meet.
Do contemplate the possibility that a rapid un-accept, done before the answer-giver has had a reasonable amount of time to think about improving his/her answer, might well alienate and antagonize that answer-giver. The answer-giver's reaction might well be not only to ignore your request for an improved answer, but any and all questions you might pose in the future on TeX.SE.
I've experienced many instances of OPs contacting me after they had already accepted an answer of mine, asking for an extension and, yes, sometimes a correction. I almost invariably address these follow-up requests with a positive attitude, even if the follow-up is mostly caused by unclear wording in the initial query. But here's how I handle what I consider to be impolite, inconsiderate, and sometimes downright belligerent [!] requests for follow-up work: I simply ignore the person's request, except maybe to delete the answer entirely (to make it less straightforward for them to continue their harassing behavior), and I make a note to myself to ignore any and all queries this particular user may post in the future, ever, no matter the merits of the query. Life is too short to waste time on being harassed by bullies.