great find. I just found a nice 1964 quarter in my change today. It got my attention because it looked a little "different". I first thought it was counterfeit, then I read the date and couldn't believe it. I came so close to spending it. It has been decades since I found any silver!
I wouldn't necessarily say that a 1940-D is a "key date;" that distinction goes solely to the 1932-D and 1932-S. That said, early date branch mint coins are in some cases "semi-keys", so kudos to you on a nice find!
Its pretty worn. Maybe $5. https://www.pcgs.com/prices/priceguidedetail.aspx?ms=1&pr=1&sp=1&c=112&title=washington+quarter
The coin is in such bad shape it is only worth only silver value. $2.75 But a nice find in circulation.