We can replace the key with respective value in a CLOB in sql with replace function.
test_clob CLOB; // Type of test_clob is CLOB
test_clob := replace(test_clob, 'http', 'https');
This command will replace all occurrence of http with https from test_clob and store that in same file.
Note: Don't change this in buffer while writing data to CLOB. With this it will replace but after last occurrence of the key it will not append data to the file.
test_lob.writeappend(test_clob, length(buffer), REPLACE(buffer,'http','https'));