I'm sure you'll be fine when it comes to lectures this time round because as you said you're genuinely interested in the course content.
However if you think there may be an underlying issue then definitely go to your gp as they might be able to prescribe you medication that could help you relax so you can concentrate.
No one can totally concentrate for 3hours straight and most people would struggle to properly concentrate for half an hour. I definitely find myself zoning out every now and then during lectures and seminars and that's completely normal! Some general tips for concentration is to make sure you have a consistent sleep schedule (and that you get enough of it), make sure you eat healthily- vit C is great for concentration and being sharp, and to take time to breathe. I know this is relatively vague and generic but hopefully it might help a little!
Lucy