So, did a quick Google search and seems it can be quite common with chickens, will see if I can put a link to another post on here, it's a chicken but it does talk about the possibility of it being infection/fungal/blockage so will give you some things to consider at least, and also treatment options for those things. On page one there is a link that take you to a description of how to unclog a nostril, although they talk on the thread about using coconut oil to soften it which I would probably try first if it was me b4 going the peroxide route.
Maybe that would be a good first step (other than vet) and if the discharge/crust comes back then explore the cause as it would be clear there is more going on under the surface! You are lucky that he's so tame as I think it's probably going to take a lot of work and patience to work the blockage out, if that's what you try to do, with it being there so long
(something mentioned them getting calcified after a while) also you will be able to determine if picking it is causing pain more so than with an average untamed bird that would be distressed at being handled regardless.
Hope that helps, and hopefully if there are risks involved applying the chicken info to quails then someone will jump in quick!
Nearly forgot to add the link
https://www.backyardchickens.com/t/...king-nostrils-pics-posted-more-pics-15-and-16