Macfarlanes, Lovells lead on £40m unitranche