In this case I would use "have passed", but apparently it's OK to treat "forty years" as a unit and use a singular verb, too:
Plural unit words of distance, money, and time take a singular verb:
300 miles is a long ways to go on a bicycle. (distance)
Two hundred dollars seems a lot to spend on a dress. (money)
Fifteen years is a long time to spend in jail. (time)
(https://staff.washington.edu/marynell/grammar/agreement.html)
Examples that use a singular verb:
In Finland, a customs debt will expire within three years. A service of a customs debt is not possible after three years has passed from its occurrence.
(Procedural Rules in Tax Law in the Context of European Union and Domestic Law)
Well, ten years has passed and I would like to update you on my recovery, relationship with the driver and what happened to the others who were in the car.
(Google Books)
In fact, 23 years has passed since I wrote the entries in 1983-84, 14 years has passed since I had wrote the entries in 1993-94 and seven years has passed since I had wrote the entries in 2001-02.
(Google Books)