The easiest way to save your clumpy nail polish is to put it in a container of hot water. After two minutes, roll it in your hands to mix the polish inside.
Or you can add a nail polish thinner, which will easily mix with your nail polish to thin its consistency. Only add about one drop, as too much could dry your polish out.
To really ensure your nail polish never goes bad, proper storage is key. It should be stored in a cool environment out of direct sunlight and upright, not sideways or upside down.