Salman Khan to pay Rs 40 lakh to free 400 prisoners