- strtotime: documentation ( source)
<?php
$device_time_stamp = strtotime('-5 minutes');
$last_update_threshold_time_stamp = strtotime('-10 minutes');
$device["is_online"] = ($device_time_stamp >= $last_update_threshold_time_stamp ? true : false);