Auto Deleting Codes that have expired for Locks

Any way we can add a feature to auto delete codes 24-48 hours after they expire?