As it was already pointed out in the comments, the easiest approach would be to translate the object so the pivot point is at the origin, then rotate the object around the origin, and then translate it back. Each of the these steps can be done using a matrix; multiplying these matrices should result in a matrix that does all this at once.
In the given example, these matrices would be:
1.translation by (-3,-4,0):
[ 1, 0, 0,-3,
0, 1, 0,-4,
0, 0, 1, 0,
0, 0, 0, 1 ]
2. rotation (in this example by 90 degrees)
[ 0, 1, 0, 0,
-1, 0, 0, 0,
0, 0, 1, 0,
0, 0, 0, 1 ]
3. translation by (3,4,0)
[ 1, 0, 0, 3,
0, 1, 0, 4,
0, 0, 1, 0,
0, 0, 0, 1 ]
This would then result in the following matrix as the final transformation:
[ 0, 1, 0,-1,
-1, 0, 0, 7,
0, 0, 1, 0,
0, 0, 0, 1 ]
You may need to change the order of multiplication depending on your implementation details, but in general this should work.