Japanese shipping companies MOL and NYK have reached an agreement in Britain to pay a total settlement of £54 million (€61.5 million).