You have a solution for MYSQL in other answers, a good solution for PHP is:-
$now = new \DateTime();
$target = new \DateTime(getTimeStringFromDB());
$minutes = ($target->getTimestamp() - $now->getTimestamp())/60;
if($minutes < 15){
// Do some stuff
} else {
//Do some other stuff
}