Had abdominal muscle spasms for three months, my doctor diagnosed it as costochondritis of the lower ribs. Symptoms appear while I walk, could GI be?

Unlikely. If this were costeachondritis i would expect it to have been resolved after three months. Injury to the muscles of the abdominal wall or a problem with your bowel is more plausible. I would seek another opinion from your healthcare provider.
Maybe... Sounds like musculoskeletal pain like costochondritis or rib strain as it happens with movements. Peritoneal irritation caused by infectious or inflammatory disease can be aggravated by walking. Gi cause is certainly possible though.
Poor digestion. When undigested food come through to large intestine it causes spasms need digestive enzymes before meals and betaine hcl after meals - if untreated will create irritable or inflammatory bowel issues.