An explosion ripped through a wedding party in Afghanistan capital Kabul, leaving 40 people killed and several wounded.