It depends on a few things
(I) If the cohort is very strong and the lowest mark in the cohort is still a high mark (e.g the student hasn't received 40% for all SACs, for example)
(II) If the student manages to get a higher cohort rank in the exam than they do in SACs. This is unlikely, since usually in VCE the mark at the end of the year is indicative of the marks consistently received throughout the year.
A student in such a scenario as you describe must strive to improve SAC rankings as greatly as possible before the time of the exam, and then achieve the highest possible marks relative to the state cohort in that exam. Without this, a mark of over 40 is quite unlikely.
Everything in VCE is relative. If you get 85% in the exam but the highest mark in the state was 85%, then you will get over 40 because of the bell curve. But if you get 85% in the exam and the state average is 95%, then you will certainly not.