Will that set the date expiration to automatically end after 30 days? I also need an option for the gold member to set their own expiration if they want
That depends on your usage of the substitution. It certainly can however. For instance if you use CB Query Field to calculate the difference in days between subscription date and now and the difference is 31 days then you'd use for example cb_datediff<="30" meaning the difference would need to be less than or equal to 30.
Will I be able to achieve this with the code and files supplied??
Suppose so if you created CB Query Field to calculate based off an existing field which the user supplied.
It's a very complex process and will take a couple days to tinker and test. It's primarily just usage of substitutions, but you need to know SQL in order to properly setup CB Query Field to give you the date difference in days (which was already supplied to you). Once you have that date difference in days you'd just use substitution IF statements.