Just do the measurements that FBinNy described. However, be warned that tires widths often vary by as much as +/- 10% compared to what is printed on them. Therefore, your current "30" tires could actually measure anywhere from about 27 to 33 mm, and the new "40" tires could measure anywhere from 36 to 44 mm. So, instead of looking for a simple 10mm of extra clearance (5mm on each side and 10mm on the top), you'll need somewhere between 3 and 17 mm of additional clearance! Good luck!