Do I have to upgrade to the new version before October 31 if I just HODL or can I upgrade anytime in the future?
no you don't, if you understand blockchain then you should not ask this question
all old coins on your wallet (time when a fork happen will always be on all chain after a fork)
the day you wanna move your coins, you will need the correct wallet sync on the right chain
and if you hold sia's for longer time don't forget to claim your hyperspace coin, as that fork already happened