Since you have 40 days I think you have enough time for a round trip. Kerala is nice but dont miss the hills(Manali, Shimla, Ladak?) but make sure its season time and you get guides becasue sometimes they close tourism to those places becasue of the rains. I dont think you will be able to enjoy much in Goa becasue it'll be raining cats and RIZKS there:) But you can go there for a few days. If you want to go to some good beaches there are some in Karnataka like Gokaran(its supposed to be a Virgin beach) and Devbagh and Manglore.

"Ali Baba and 40 thieves" are now "Ali Baba and 30 thieves" ; 10 were laid off.