How to reset (make empty) the «Base URL for User Media Files» option value by an SQL query?

The configuration key is web/unsecure/base_media_url:

https://github.com/magento/magento2/blob/137733b/app/code/Magento/Backend/etc/adminhtml/system.xml#L449-L453

UPDATE core_config_data 
	SET value = null
	WHERE 'web/unsecure/base_media_url' = path
;

See also: