A Royal Navy warship has seized £5.4 million worth of class A drugs in the Middle East.