If your 5800s were gradually upgraded from R77 to R80.20 and if you can afford downtime window, better way, in my opinion is:
-2. Perform backup on the management server (s)
-1. Perform snapshots on the 5800s
0. Record current cluster networking topology and antispoofing parameters
1. dump Gaia configs from both cluster members (save configuration <filename>,
2. clean it up,
3. fresh install R80.40 + JHFAs (current ongoing release 92 looks better than GA 91)
4. rerun FTW
5. load the Gaia configs
6. Re-establish sic with cluster members
7. Verify and adjust topology data (if necessary)
8. Publish changes and install policy
Otherwise, simply follow upgrade guide and it is pretty trivial:
https://sc1.checkpoint.com/documents/R80.40/WebAdminGuides/EN/CP_R80.40_Installation_and_Upgrade_Gui...