Having this this many, many times over the years,,,remove all the fish from the tank and keep them in a temporary aquarium. Believe me, you do not want to be rushed, and having the fish comfortably in a temporary tank is well advised. It also avoids killing them should you encounter any anaerobic areas, which depending upon the length of time the tank has been running might be a real issue.
Drain all the water and take out all the plants/decor, then scoop out all of the gravel. I always used a soft sponge to mop up water and detritus. I like starting with a clean tank.
Sand especially play sand (which for cories is excellent) can be quite dirty, but I never fussed over this. Four or five rinses in a bucket of say 3 or 4 cups of sand at a time was it. The "dirt" will settle out, and is natural and not going to harm fish or plants. Arrange the hardscape, and plant any substrate-rooted plants. Half fill the tank with water to do this, it avoids damaging plants. Then drain it right down to the sand, and fill with fresh tap water using a bowl to avoid disturbing the sand more than necessary. Replace the filter and heater, use conditioner obviously, then if the temp matches net the fish back in. Fast growing plants especially growing floating plants will avoid any "cycling" issues.