We can use the following command in kafka machine to update kafka retention period during runtime:
bin/kafka-topics.sh --zookeeper --alter --