Hi Irene,
I've been researching the Carberry family around that area, but have not come across Thomas Carberry or Margaret Grahame before.
My ggg-grandmother was Margaret Carberry and I think she was born in Park, Ballyboggan (beside Castlejordan in Ballinabrackey RC parish) to Patrick Carberry and Mary Dempsey in 1838.
The Carberrys I've been tracing are in:
Park, Ballyboggan
Ardnamullen near Clonard (north of Ballyboggan)
Creggstown, Killucan (across the border in Co. Westmeath)
I suspect a link between all of these Carberrys. There are a couple of others also, in Hydepark, Killucan and Kinnegad.
Perhaps further analysis of the baptism sponsors or marriage witnesses may throw up some connections?
The only mention of Thomas Carberry from around that time that I've seen myself is a baptism in 1831 in Kinnegad RC parish to Thomas Carberry and Mary (don't know her surname). Although it's just across the county border, I'm not sure if this is your Thomas.
I did see a burial record for Thomas Carberry in Ballinabrackey RC parish in 1979 and listed his townland as Castlejordan. Perhaps there are some relatives still living there who might help?