No need to stop the server.
You can delete the n1ql cache entry with
delete from system:prepareds where name="…"
(where the dots are the name of the prepared statement).
You also have to restart the application to clear the application cache, or the application will pass again the old plan to the N1QL service.