See script in this post, for converting $lastSeenStr (date-time format) into timestamp you can use $datetime2epoch function created by @rextended taken from here, $validity is in time type, to convert it into timestamp you can use ROS global command :tonum, in your case [:tonum $validity] (if is string variable you can convert it with [:tonum [:totime $validity]]) and then you can sum both timestamps. If you need to convert summed timestamps result back to date-time format you can use also @rextended function $unixtodatetime from here.