While a filtration mask may prove to be useful in this or similar situations, please keep in mind that they do not provide a source of air (oxygen). Gaseous products that might leak from a railcar or truck might in addition to being toxic/noxious may actually displace breathable air. In these circumstances, no filtration mask will be of benefit, distance from the scene as quickly as possible is your only option, short of having and using a breathing apparatus (SCBA or SABA).

Pete