Usually Sunstroke symptoms includes nausea, headache, dizziness, vomiting, confusion, muscle cramps
. Rarely sometimes the same symptoms can be caused by dehydration
, metabolic problems, and serum electrolyte differences.
You can rule out some other problems like Diabetes Mellitus
, Coronary Artery Diseases(CAD) and mainly do some routine blood tests for serum electrolyte changes.
You may have hydrated with some drinks but its content is also important.
Please check for CAD because in your question you mentioned that it does not happen if you walk only 3 kilometers and you are around 40 Y/O.
Have a good health.