Matā concerns when an event occurs. “The lesson took place on Monday” relates it to a time.
“The lesson lasted 40 minutes” additionally concerns a measurable duration. That involves an aspect of quantity. We should not place every expression containing a number exclusively into the category of time.
One event may have multiple descriptions:
Where? At school — place.
When? On Monday — time.
How long? Forty minutes — measured duration.