It depends.
1) Do you want to improve on something that can be done in 30 minutes, which is going to restrict you to sprint intervals.
2) The number of intervals you can do increases with fitness. If an average person can do 2x20minutes at FTP in a session, then Geraint Thomas is probably doing 5 or 6 (even at his much higher FTP). Or at the other end, if a 30min session has a number of maxiumum effort sprints, then the fitter you are the less effective that becomes because the number you could have done is getting bigger and bigger. So you’re not reaching that point of failure that triggers the body into doing something about it and addapting.
Which then brings you to the conflict between 1 and 2.
No point doing sprint intervals before you’ve done the base miles, lost the winter weight, FTP building type stuff. That sprint power will be long gone by summer. So if you’re unfit enough to get a benefit from a 30min session then you’re not at the stage where you would get a benefit from a 30 minute session.