Welcome to Ireland Reaching Out!
I searched for civil birth records from 1864-1874 and did not find a John Malley record with the parents you listed. I did find birth records for possible siblings of John in 1870 and 1871. In 1871, John Malley and Mary Kane Malley had moved to the town of Castlebar and John was listed as a pensioner. Possibly he was in the military?
I searched for death records and there were two possible records of a Mary Malley dying in her 40s in 1882 and 1886 where her husband was John but they were farmers. There were also a couple of leads for John Malley death records in 1889 and 1892. Use the free site www.irishgenealogy.ie