An Andy Warhol portrait of Brigitte Bardot, which was commissioned by her late ex-husband Gunter Sachs, has sold for more than $5 million (£3.1 million) at auction in London.