I think it's around 7-8 hours from mardan to Chitral city.
The road is good enough till Dir or Lowari top as long as I remember. After that a patch of of about 20km is in bad condition. Onwards it's again good till Chitral city.
Also remember to Check all the basic and important stuff of vehicle if you plan on going because there are no proper workshop or mechanic if unfortunately some problem occurs.
Yeah you probably can get there before 5 pm.