Make sure that you have completed sufficient kilometres prior to the event. You don’t need to complete the full distance but you should gradually aim to build up a base fitness.
The more that you ride, the more you will learn about yourself as a cyclist. For example, the pace you can sustain for prolonged periods and the cadence that is most comfortable for you
Try to structure your preparation so you are not suddenly jumping from a 40-minute to a two-hour ride from one week to the next. This will help to build endurance and also ensure that your bike is ideally set up for you.