It goes without saying that you should always shops around but when you do so can affect the price you are quoted.
Moneysavingexpert has this to say:
www.moneysavingexpert.com/insurance/car-insurance/when-to-renew/
The cheapest time to get quotes is 20 to 26 days ahead of your renewal date – cover becomes more expensive the closer you get. It's the same if you are buying car insurance for the first time.
Why is it cheaper to renew my car insurance earlier?
When we concluded that 20-26 days before renewal was the cheapest time to buy car insurance, we asked insurance providers Compare The Market, Confused.com, MoneySupermarket, Admiral, Aviva, Direct Line, LV and More Than why the price differed depending on how far in advance you got the policy. All told us generally the same thing.
It's based around risk – buying it a few weeks before you need it suggests you're more careful and organised, while leaving it to the last minute means you're seen as higher risk, with some insurers telling us they've seen a direct link between drivers who leave sorting their insurance to the last moment and a higher number of claims.
As for why the super-prepared are being penalised with higher prices for getting a quote 30 days in advance, it's basically because there are fewer insurers returning quotes at that stage.
You can here Martin Lewis discussing this here around 17 minutes into the programme:
www.bbc.co.uk/sounds/play/p0gkx014