An agreement allowing Ukraine to export millions of tonnes of grain through the Black Sea despite the ongoing conflict with Russia has been extended.