Depending on availability and railway policies, it may be possible to upgrade your ticket to a higher class during the journey. Inquire with the train staff for more information.