If it's something basic, like camera or movement system or similar, then you can reuse the code as is. If it's something more elaborate, then it would be for the best to comply with the spirit of the jam by remaking it from scratch (which might lead to you improving on the original concept). Just make sure that you can honestly say that the majority of the work on the game was done during the jam period.
Good luck!