Ajith ji,
You should during closure of your factory, apply for refund for the unutilized cenvat credit with the department with relevant documents showing unutilized credits.
You have nothing to lose due to the reason that, even if the decision does not come in your favour, you shall have neither to pay any Duty, Interest or Penalty.
Just you have to make a refund application and keep track of the same at Divisional level and thereafter at Commissioner (Appeals) level about your refund case.
There are even High Court judgements on the said issue which are clearly in favour of the assessee. So don’t hesitate, just make a refund application without any delay.
Regarding time limit, you can make it before closure of the factory. Reg. procedure, you have to make a refund application in prescribed form and fill up necessary details alongwith relevant documents.