So there was no point in hiding them directly using the database from the first place, then. If you were going to code a solution, why didn't you code one that would hide the posts using Q2A? That would have unindexed the posts automatically.
At this point, it's going to be easier to write a process to UNHIDE the post and then to HIDE them. That will take care of all the steps that you missed and will not apply to all posts, only for the ones that are hidden now.