<?php
declare(strict_types=1);
require_once __DIR__ . '/../app/bootstrap.php';
$stmt = $db->prepare('UPDATE bots SET status="expired", updated_at=? WHERE status="active" AND expires_at IS NOT NULL AND expires_at < ?');
$stmt->execute([now(), now()]);
echo 'Expired bots updated: ' . $stmt->rowCount() . PHP_EOL;
