UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'J90FdXheDGvPYGg0chBcK3N1IVoNTgYBhY+Ol1CqoKk='
WHERE
key_id = '86084e322d643bb001a927d6b6e0c5e016bafd969afee8e5edda130763fff09b'
AND (
token = 'J90FdXheDGvPYGg0chBcK3N1IVoNTgYBhY+Ol1CqoKk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)