'The Office' star celebrated his 40th birthday with friends like Bob Saget, John Mayer and Mindy Kaling