If you are over the age of 18, then you are free to get with anyone over the age of 18 that can put a smile on your face. If a 40 year old man can do it for you, then you are both legally consenting adults in the eyes of the law.
You are both adults, fall for him if you like. It is a big age difference and the relationship probably won't work out long term, but you won't know unless you try.