You might try changing
if(min>1 && min<6)
to
if(sec>1 && sec<30)
It's about 10 lines down from void loop()