En man i 40-årsåldern är allvarligt skadad efter att ha anfallits i sin bil under natten till torsdagen.