Retailer Marks and Spencer said senior independent non-executive director Kevin Lomax will quit the company on 31 August.